<template>
	<view>
		<custom-navigation-bar title="区域后台"></custom-navigation-bar>
		<view class="top">
			<view class="top_1">
				名称：{{data.province}}{{data.city}}{{data.district}}
			</view>
			<view class="top_1">
				账户余额：{{user.account}} <label class="btn-1">提现</label>
			</view> 
			<view style="width: 100%;height:20rpx;float: left;"></view>
		</view> 
		<view class="menu_item" @click="village">
			<view class="menu_item_1">
				小区管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item" @click="shop()">
			<view class="menu_item_1">
				商家管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item" @click="goods()">
			<view class="menu_item_1">
				商品管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
 		<view class="menu_item">
			<view class="menu_item_1" @click="butler()">
				管家管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item" >
			<view class="menu_item_1" @click="order()">
				订单管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item">
			<view class="menu_item_1" @click="balance()">
				资金明细<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item">
			<view class="menu_item_1">
				提现记录<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
	<!--	<view class="menu_item">
			<view class="menu_item_1">
				小助手管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item">
			<view class="menu_item_1">
				律师管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item">
			<view class="menu_item_1">
				旧物换钱门店管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>

		<view class="menu_item">
			<view class="menu_item_1">
				社群管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		<view class="menu_item">
			<view class="menu_item_1">
				活动管理<image src="../../../static/gengduo@3x(1).png" class="menu_item_img"></image>
			</view>
		</view>
		
		<view class="menu_item">
			<view class="menu_item_2">
				 退出登录
			</view>
		</view> -->
	</view>
</template>

<script setup> 
	import CustomNavigationBar from '@/components/CustomNavigationBar.vue'
	import http from '../../../utils/http'; 
	
	const id=ref();
	import {
		onLoad,
		onPageScroll
	} from '@dcloudio/uni-app';
	const data=ref({
		province:'',
		city:'',
		district:''
	});
	const user=getApp().globalData.user;
	onLoad((query) => {
		id.value=query.id;
		console.log(id.value); 
		uni.showLoading({
			title: '数据加载中',
			mask:true
		});
		
		http.request({
		 	url: "/x/partner/index",
		 	method: "POST",
		 	data: {
		 		"id":query.id,
				userId:getApp().globalData.user.userId
		 	}
		}).then((responseData) => { 
			uni.hideLoading();
			if(responseData.code==1){
				 data.value=responseData.data;
			}else if(res.code==0){
				uni.showToast({
					icon: 'error',
					title: res.message
				})
			}else if(res.code==-1){
				uni.navigateTo({
					url: "/pages/login/login"
				});
			}
		}).catch((err) => {
			uni.hideLoading();
		 	uni.showToast({
		 		icon: 'error',
		 		title: '请求失败'
		 	})
		})
		
	})
	
	function applicationManagement(){
		uni.navigateTo({
			url:"/pages/approve/approve"
		})
	}
	function village(){
		uni.navigateTo({
			url:"/pages/my/partner/village?id="+data.value.id
		})
	}
	function shop(){
		uni.navigateTo({
			url:"/pages/my/partner/shop?id="+data.value.id
		})
	}
	function goods(){
		uni.navigateTo({
			url:"/pages/my/partner/goods?id="+data.value.id
		})
	}
	function butler(){
		uni.navigateTo({
			url:"/pages/my/partner/butler?id="+data.value.id
		})
	}
	function order(){
		uni.navigateTo({
			url:"/pages/my/partner/order?id="+data.value.id
		})
	}
	function balance(){
		uni.navigateTo({
			url:"/pages/my/partner/balance"
		})
	}
	const userInfo=ref({
		
	});
</script>

<style>
	.menu_item_2{
		width: 84%;margin-left: 8% ;height: 80rpx;line-height: 80rpx;float:left;text-align: center;font-size: 30rpx;font-weight: bold;
	}
	.menu_item_img{
		width: 40rpx;height: 40rpx;float: right;margin-top: 20rpx;
	}
	.menu_item_1{
		width: 84%;margin-left: 8% ;float: left;height: 80rpx;line-height: 80rpx;float:left;font-size:28rpx;font-weight: bold;
	}
	.menu_item{
		width: 100%;float: left;height: 80rpx;line-height: 80rpx;margin-top: 10rpx;background:white;
	}
	Page{
		background-color: #F2F2F2;
		font-size: 30rpx;
	}
	.btn-1{
		width: auto;border: #969696 3rpx solid;color: #969696;border-radius:10rpx;padding-left: 8rpx;padding-right: 10rpx;font-size: 28rpx;margin-left: 10rpx;
	}
	.top{
		width: 100%;height:auto;margin-top: 150rpx;background: #2AE8DC;float: left;font-size: 30rpx;
	}
	.top_1{
		width: 80%;height: 50rpx;line-height: 50rpx;float: left;margin-left: 10%;color: white;
	}
</style>